home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / do1beta.zip / ONERROR.DO < prev    next >
Text File  |  1991-07-31  |  593b  |  23 lines

  1. /*
  2.     demonstration of the Int::onError() method
  3.     this method is called whenever dObject detects a parse or runtime
  4.     error in a program; normally dObject creates a 1-line window
  5.     at the bottom of the display screen and prints out the error
  6.     number, an error message, and the statement where the error
  7.     was detected.  you can re-define this method to handle errors
  8.     for your own applications
  9. */
  10. method Int::onError(self)
  11. {
  12.     w = new(Window,1,112,112," Error ",10,10,5,50);
  13.     ? "ERROR ",errorMessage("do.err",self);
  14.     inkey();
  15.     remove(w);
  16. }
  17.  
  18. /*
  19.     cause an error
  20. */
  21. exit(10002);
  22.  
  23.